package com.game.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.game.modal.PointDetail;
import com.game.modal.PointDetailInfo;
import com.game.service.IMessageService;
import com.game.util.ResultInfo;

@RestController
@RequestMapping("/msg")
public class MessageController {
	
	@Autowired
	private IMessageService messageService;
	@RequestMapping("/grab")
	public ResultInfo grabPoint(String pointId,String receiverId){
		
		return messageService.grab(receiverId,pointId);
	}
	
	@RequestMapping("/detail")
	public PointDetailInfo list(String pointId){
		
		return messageService.queryDetail(pointId);
	}
}
